package net.mlike.openssp.server.service;

import net.mlike.openssp.server.repository.BaseRepository;
import net.mlike.openssp.server.search.BaseSearch;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.repository.JpaRepository;

import javax.transaction.Transactional;

/**
 * Created by wallellen@hotmail.com on 5/26/18.
 */
@Transactional
public interface BaseService<T> {
    BaseRepository getRepository();

    T findById(String id);

    void save(T role);

    void delete(String id);

    Page<T> findBySearch(BaseSearch search);
}
